#include <stdio.h>
#include <unistd.h>

int main()
{
    pid_t id = fork();
    if(id == 0)
    {
        //child
        printf("我是子进程，我的pid是%d\n",getpid());
        sleep(2);
    }
    else
    {
        printf("我是父进程，我的pid是%d\n",getpid());
        sleep(2);
    }
    return 0;
}